import com.pbking.util.eventHandling.Event;
/**
 * This is the objects that are kept in the EventBroadcaster.  These should only be created/used BY the EventBroadcaster.<BR>
 * When an event is fired whose eventType matches this eventType, this event is executed.<BR>
 * This is handled by the Event Broadcaster.
 * 
 * @author Jason Crist
 */
class com.pbking.util.eventHandling.EventListenerObject {
	
	public var eventType:String;
	public var target:Object;
	public var callback:Function;
	public var singleEvent:Boolean;
	
	function EventListenerObject(eventType:String, target:Object, callback:Function, singleEvent:Boolean){
		this.eventType = eventType;
		this.target = target;
		this.callback = callback;
		this.singleEvent = singleEvent;
	}
	
	function execute(event:Event){
		target.___eventCallbackFunction___ = callback;
		target.___eventCallbackFunction___(event);
		target.___eventCallbackFunction___ = null;
	}
	
}